package net.minecraft.src;

import java.util.Random;

public class mod_Tins extends BaseMod
{
	public static final Block oreTin = (new Block(102, ModLoader.addOverride("/terrain.png", "/Periodic/oreTin.png"), Material.rock)).setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setBlockName("oreTin");
	public static final Item ingotTin = new Item(1501).setItemName("ingotTin");

	public mod_Tins()
	{
		ModLoader.AddName(oreTin, "Tin Ore");
		ModLoader.AddName(ingotTin, "Tin Ingot");
		ModLoader.AddSmelting(oreTin.blockID, new ItemStack(ingotTin, 1));
		ModLoader.RegisterBlock(oreTin);
		ModLoader.AddRecipe(new ItemStack(oreTin, 1), new Object[] {
			"x", Character.valueOf('x'), Block.sand
		});

		ingotTin.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/ingotTin.png");
	}

	public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
	{
		/*for(int i = 0; i < 17; i++)
		{
			int randPosX = chunkX + rand.nextInt(16);
			int randPosY = rand.nextInt(70);
			int randPosZ = chunkZ + rand.nextInt(16);
			(new WorldGenMinable(TinOre.blockID, 10)).generate(world, rand, randPosX, randPosY, randPosZ );
		}*/
		for (int i = 0; i < 25; i++)
		{
			int x = chunkX + rand.nextInt(16);
			int y = rand.nextInt(45);
			int z = chunkZ + rand.nextInt(16);
			new WorldGenMinable(oreTin.blockID, 6).generate(world, rand, x, y, z);
		}
		for (int i = 0; i < 15; i++)
		{
			int x = chunkX + rand.nextInt(16);
			int y = rand.nextInt(25);
			int z = chunkZ + rand.nextInt(16);
			new WorldGenMinable(oreTin.blockID, 8).generate(world, rand, x, y, z);
		}
	}

	public String Version()
	{
		return "1.5_01";
	}
}
